<div class="main">
	<div id="monitor">
		<form action="./search_monitor" method="get">
			<div id="search_condition">
				<div id="search_type">
					<ul class="search">
						<li class="<?php echo $search_type=="brand_search"?"on":""?>" id="brand_search"><a href="javascript:void(0)">品牌/产品</a></li>
						<li class="<?php echo $search_type=="industry_search"?"on":""?>"  id="industry_search"><a href="javascript:void(0)">行业</a></li>
						<input type="hidden" name="search_type" id="search_type_name" value="<?php echo $search_type ?>"/>
					</ul>
				</div>
				<div class="search_table">
					<div class="search_area">
						<ul class="media_type_list">
							<li ><input type="radio" class="select_media_type" id="mt1" name="media_type" value="common" <?php echo $media_type=="common"?"checked=\"checked\" ":"" ?>> <label for="mt1">市区大牌</label></li>
							<li ><input type="radio" class="select_media_type" id="mt2" name="media_type" value="led" <?php echo $media_type=="led"?"checked=\"checked\" ":"" ?>> <label for="mt2">LED大屏</label></li>
							<li ><input type="radio" class="select_media_type" id="mt3" name="media_type" value="highway" <?php echo $media_type=="highway"?"checked=\"checked\" ":"" ?>> <label for="mt3">高速大牌</label></li>
							<li ><input type="radio" class="select_media_type" id="mt4" name="media_type"  value="airport" <?php echo $media_type=="airport"?"checked=\"checked\" ":"" ?>> <label for="mt4">机场媒体</label></li>
						</ul>
					</div>
					<div class="search_area brand_search" <?php echo $search_type !="brand_search"?"style=\"display: none;\"":"";?>>
						<div class="search_title">品牌/产品名称：</div>
						<div class="search_content">
							<input type="text" name="brand_name" class="brand" value="<?php echo $brand_name?>" autocomplete="off" placeholder="请输入品牌/产品名称 例如:东风雪铁龙" />
							<input type="hidden" name="brand_id" id="brand_id" value="<?php echo $brand_id?>">
							<input type="hidden" name="search_name_type" id="search_name_type" value="<?php echo $search_name_type?>">
						</div>
						<div id="search_auto" style="display:none;">
							<ul class="search_auto"></ul>
						</div>
					</div>
					<div class="search_area industry_search"  <?php echo $search_type !="industry_search"?"style=\"display: none;\"":"";?>>
						<div class="search_title">行业/品类：</div>
						<div class="search_content">
							
							<select  class="industry_select" onchange="industry_change()" id="industry" name="industry" >
								<option value="">请选择</option>
								<?php if ($industry_list) {
									foreach ($industry_list as $industrys){?><option value="<?php echo $industrys['industry_id']?>"  <?php echo $industrys['industry_id']==$industry?"selected='selected'":"";?> ><?php echo $industrys['industry_name']?></option><?php 
									}
								}?>
							</select>
							<select  class="industry_select" id="industry_category" name="industry_category" >
								<option value="">请选择</option>
								<?php if ($industry_category_list) {
									foreach ($industry_category_list as $industry_categorys){?><option value="<?php echo $industry_categorys['industry_id']?>"  <?php echo $industry_categorys['industry_id']==$industry_category?"selected='selected'":"";?> ><?php echo $industry_categorys['industry_name']?></option><?php 
									};
								}?>
							</select>
						</div>
					</div>
					<div class="search_area">
						<div class="search_title">位　置：</div>
						<div class="search_content">
							<div class="area_list">
								<select  class="area_select" onchange="province_change()" id="province" name="province" >
									<option value="">请选择</option>
									<?php if ($regions) {
										foreach ($regions as $region){?><option value="<?php echo $region['region_id']?>" <?php echo $region['region_id']==$province?"selected='selected'":"";?>><?php echo $region['region_name']?></option><?php 
										};
									}?>
									
								</select>
							</div>
							<div class="area_list" id="city_zone">
							<?php if ($media_type=="common"||$media_type=="led") {
								$input_name ="city";
							}elseif ($media_type=="highway"){
								$input_name ="highway";
							}elseif ($media_type=="airport"){
								$input_name ="airport";
							}?>
								<select class="area_select" onchange="city_change()" id="city" name="<?php echo $input_name?>">
									<option value="">请选择</option>
									<?php if ($media_type=="common"||$media_type=="led") {?>
									<?php if ($citys) {
										foreach ($citys as $c){?><option value="<?php echo $c['region_id']?>" <?php echo $c['region_id']==$city?"selected='selected'":"";?>><?php echo $c['region_name']?></option><?php 
										};
									}?>
									<?php }elseif ($media_type=="highway"){
										foreach ($highways as $h){?><option value="<?php echo $h['highway_id']?>" <?php echo $h['highway_id']==$highway?"selected='selected'":"";?>><?php echo $h['highway_name']?></option><?php
										};
									} elseif ($media_type=="airport"){
										foreach ($airports as $a){?><option value="<?php echo $h['airport_id']?>" <?php echo $a['airport_id']==$airport?"selected='selected'":"";?>><?php echo $a['airport_name']?></option><?php
										};
									}?>
								</select>
							</div>
							<div class="area_list" id="area_zone">
								<select class="area_select"  id="area" name="area">
									<option value="">请选择</option>
									<?php if ($areas) {
										foreach ($areas as $a){?><option value="<?php echo $a['region_id']?>" <?php echo $a['region_id']==$area?"selected='selected'":"";?>><?php echo $a['region_name']?></option><?php 
										};
									}?>
								</select>
							</div>
							<script type="text/javascript">
								$(document).ready(function(){
									<?php if ($media_type=="highway") {?>
										$("#area_zone").hide();
										$("#city_zone").find(".chosen-container").css("width","220px");
										$("#city").trigger("chosen:updated");
									<?php }?>
									<?php if ($media_type=="airport") {?>
										$("#area_zone").hide();
										$("#city_zone").find(".chosen-container").css("width","220px");
										$("#city").trigger("chosen:updated");
									<?php }?>
								});
							</script>
						</div>
					</div>
					<div class="search_area">
						<div class="search_title">日期范围：</div>
						<div class="search_content">
							<input type="text" class="date" id="from" name="start_date" value="<?php echo $start_date?>"/>　至　 
							<input type="text" class="date" id="to" name="end_date" value="<?php echo $end_date?>"/>
						</div>
					</div>
				</div>
			</div>
			
			<div id="search_right">
				<input type="submit" class="search" value="">
				<div class="media_num_content"><span class="num"><?php echo number_format($statistics['city_num'],0,".",",")?></span>个城市，<span class="num"><?php echo number_format($statistics['media_num'],0,".",",")?></span>个户外媒体信息</div>
			</div>
		</form>
	</div>
	<div id="filter">
		<div class="page_filter">
			<div class="title-key">监测数据浏览界面 Interface</div>
			<div class="title-value">
				<div class="col col1">
				<?php $search_data1 =$search_data; ?>
				每页显示 <a href="<?php $search_data1['page_size']=20 ;echo "?".http_build_query($search_data1)?>" <?php echo $page_size==20?"class='on'":""?>>20</a> 
					<a href="<?php  $search_data1['page_size']=50 ;echo "?".http_build_query($search_data1)?>" <?php echo $page_size==50?"class='on'":""?>>50</a> 
					<a href="<?php  $search_data1['page_size']=80 ;echo "?".http_build_query($search_data1)?>" <?php echo $page_size==80?"class='on'":""?>>80</a> 条
				</div>
				<div class="col col12" >  
					<input type="checkbox" id="show_thumb" name="show_type"  <?php echo $show_type=="monitor_search_grid"?"checked=\"checked\"":"";?>  ><label for="show_thumb" >显示缩略图</label>
				</div>
			</div>
		</div>
	</div> 
	<div class="f_right">
		<div class="pagin pagin-m" ><span class="text"><i>1</i>/<?php echo $num_pages = ceil($num / $page_size);?></span>
			<?php echo $list_top_page_link?>
		</div>
		<div class="total"><span>共 <strong><?php echo $num?></strong> 个监测数据</span></div>
	</div>
	<table class="monitor_tbl">
		<thead>
			<tr>
				<td width="41px"></td>
				<td width="120px">品牌</td>
				<td width="">产品名称</td>
				<td width="100px">媒体形式</td>
				<td width="120px">点位属性</td>
				<td width="120px">所在城市/高速</td>
				<td width="110px">日期</td>
				<td width="100px">媒体编号</td>
			</tr>
		</thead>
		<tbody>
			<tr >
				<td ></td>
				<td align="center">
<!-- 					<select class="ct_select"> -->
<!-- 						<option>所有</option> -->
<!-- 					</select> -->
				</td>
				<td  align="center">
<!-- 					<input type="text"  class="m_text"> -->
				</td>
				<td align="center">
<!-- 					<select class="ct_select"> -->
<!-- 						<option>所有</option> -->
<!-- 					</select> -->
				</td>
				<td align="center">
<!-- 					<select class="ct_select"> -->
<!-- 						<option>所有</option> -->
<!-- 					</select> -->
				</td>
				<td align="center">
<!-- 					<select class="ct_select"> -->
<!-- 						<option>所有</option> -->
<!-- 					</select> -->
				</td>
				<td ></td>
				<td >
						<input type="checkbox" id="remove_duplicate" name="remove_duplicate"  <?php echo $remove_duplicate=="1"?"checked=\"checked\"":"";?>  ><label for="remove_duplicate" >去除同编号</label>
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<div class="sm">
						<div class="sm_left">
							<h1>您正在使用的是SSI数据监测免费版</h1>
							<p>查询的时间范围被锁定为四个月前的数据</p>
							<p>返回的数据量被限制为1页(20条记录)</p>
							<p>在近四个月内,还有16条数据未能显示</p>
						</div>
						<div class="sm_center"></div>
						<div class="sm_right">
							<p><a href="#">点击这里</a> 了解付费版价格</p>
							<div class="orange_btn2"><a href="#">立即申请免费试用</a></div>
						</div>
					</div>
				</td>
			</tr>
			<?php 
			$monitor_num =count($monitor_list);
			for ($i=0;$i<$monitor_num;$i++){?>
				<tr class="<?php echo $i % 2==0?"":"odd"?> monitor_title_list">
				<td align="right"><a href="javascript:void(0)" class="list_sd"><?php echo $show_type=="monitor_search_grid"?"▲":"▼";?></a></td>
				<td align="center" class="orange_font">
					<?php echo $monitor_list[$i]['brand_name']?>
				</td>
				<td  class="orange_font">
					<?php echo $monitor_list[$i]['product_name']?>
				</td>
				<td align="center">
					<?php echo $monitor_list[$i]['media_type_name']?>
				</td>
				<td align="center">
				</td>
				<td align="center">
					<?php echo $monitor_list[$i]['city_name']?>
				</td>
				<td align="center"><?php echo substr($monitor_list[$i]['monitor_time'],0,10)?></td>
				<td align="center">
					<?php echo substr($monitor_list[$i]['media_id'],0,10)?>
				</td>
			</tr>
			<tr class="<?php echo $i % 2==0?"":"odd"?> jp_detail" <?php echo $show_type=="monitor_search_grid"?"":"style=\"display: none;\"";?> >
				<td colspan="8">
					<table class="jp_detail_tbl">
						<tr>
							<td class="jp_detail_img" rowspan="2">
								<img alt="" src="<?php echo $this->config->item('ssi_pic_url').$monitor_list[$i]['monitor_pic']?>">
							</td>
							<td class="l1">具体位置</td>
							<td class="orange_font l2"><?php echo $monitor_list[$i]['location']?></td>
							<td class="l1">产品类目</td>
							<td class="orange_font l3"><?php echo $monitor_list[$i]['industry_name']?> &gt; <?php echo $monitor_list[$i]['category_name']?></td>
						</tr>
						<tr>
							<td>媒体规格</td>
							<td class="orange_font"><?php echo format_media_specification($monitor_list[$i]['specification_width'],$monitor_list[$i]['specification_height'])?> =<?php echo $monitor_list[$i]['specification']?> 平米</td>
							<td>估　　价</td>
							<td class="orange_font"><?php echo $monitor_list[$i]['reference_price']?>万/年</td>
						</tr>
					</table>
				</td>
			</tr>
			<?php }?>
		</tbody>
	</table>
	<div class="pager">
			<div class="pagin fr">
			<?php echo $bottom_page_link?>
			</div>
	</div>
</div>